<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="../common.jsp"%>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title></title>
</head>

<body>
	<div class="place">
	    <span>位置：</span>
	    <ul class="placeul">
	    <li><a href="#">用户管理</a></li>
	    <li><a href="#">用户管理</a></li>
	    </ul>
	 </div>

<!-- 添加用户form    此节点内部的内容会在弹出框内显示,默认隐藏此节点   -->
    <div id="doc_content" class="hidden" style="display:none;">
      <form id="docForm" class="form-horizontal" method="post" action="">
        <div class="row">
      		<div class="control-group span12">
            	<label class="control-label">职工号:</label>
            	<div class="controls">
              		<input type="text" class="input-normal control-text" name="eno" id="eno">
              		<span class="validate_color">*</span>
            	</div>
            	
         	 </div>
        </div>
        <div class="row">
          	<div class="control-group span12">
           		<label class="control-label">用户名:</label>
            	<div class="controls">
					 <input type="text" class="input-normal control-text" name="name" id="name">
              		 <span class="validate_color">*</span>
            	</div>
           
          	</div>
          <div class="control-group span12"> 
             <label class="control-label">密码:</label>
            	<div class="controls">
			  		<input type="password" class="input-normal control-text" name="password" id="password" >
			  		<span class="validate_color">*</span>
             	</div>
            
          </div>
          <div class="control-group span12">
             <label class="control-label">确认密码:</label>
            	<div class="controls">
			   		<input type="password" class="input-normal control-text" name="passWordTwo" id="passWordTwo" >
			   		<span class="validate_color">*</span>
            	</div>
          </div>
        </div>
        <div class="row">
         <div class="control-group span12">
          	 <label class="control-label">权限:</label>
          	 <div class="controls">
 				<select class="input-normal" id="pmsn" name="pmsn"> 
               		 <option value="">普通权限</option>
               		 <option>管理员权限</option>
               		 <option>操作员权限</option>
             	</select>
             	<span class="validate_color">*</span>
            </div>
          </div>
          <div><input type="text" name="type" style="display: none;" id="type"/></div>
        </div>

      </form>
    </div>

    <div class="rightinfo" >
    
    <div class="tools">
    
    	<ul class="toolbar">
         <li id="btnShow"><span><img src="${path}/images/t01.png" /></span>添加</li>
         <li onclick="del_doc('docSelectCbx')"><span><img src="${path}/images/t03.png" ></span>删除</li>       
         <li onclick="unfree_doc('docSelectCbx')"><span><img src="${path}/images/t02.png" ></span>冻结</li>
        </ul>
       	
       	<ul class="toolbar1">
    	 <li onclick="showDocPageDataList(1)"><span><img src="${path}/images/t04.png" /></span>查询</li>
        </ul>
       	<ul class="toolbar2">
       	 <li><input type="text" id="user_Name" value="${chaxun}" style="margin-top:3px;"></li>
       	</ul>
        
        
    
    </div>
    <table class="tablelist" id="docTable">
    	<thead>
    	<tr>
        <th class="cbx"><input name="" type="checkbox" value="" id="docSelectAll" onclick="selectAllCheck('docSelectAll','docSelectCbx')"/></th>
        <th>用户名</th>
        <th>职工号</th>
		<th>医生姓名</th>
        <th>权限</th>
        <th class="cbx">状态</th>
        <th class="operate">操作</th>
        </tr>
        </thead>
  	 	<c:if test="${!empty docPageInfo}">
  	 		<c:forEach items="${docBeanList }" var="docList">
  	 			<tr>
  	 				<c:if test="${ docList.id==1}"><td></td></c:if>
			        <c:if test="${ docList.id!=1}"><td><input name="docSelectCbx" id='doc_${docList.id}' type="checkbox" value="" onclick="cbxCheck('docSelectAll','docSelectCbx');"/></td></c:if>
			        <td title="${docList.name}"><script type="text/javascript">document.write(getSubstr('${docList.name}',15))</script></td>
			        <td title="${docList.eno}"><script type="text/javascript">document.write(getSubstr('${docList.eno}',10))</script></td>
					<td title="${docList.d_name }"><script type="text/javascript">document.write(getSubstr('${docList.d_name}',15))</script></td>
					<c:if test="${ docList.pmsn==1}"><td>管理员权限</td></c:if>
					<c:if test="${ docList.pmsn==2}"><td>操作员权限</td></c:if>
					<c:if test="${ docList.pmsn==3}"><td>普通权限</td></c:if>
			        <td><c:if test="${docList.status==1}"><label class="online"></label></c:if><c:if test="${docList.status==0}"><label class="offerline"></label></c:if></td>
			        <td>
			        	<ul class="tabletoolbar"  id='doc_operate${docList.id}'>
			        		<c:if test="${ docList.id!=1}">
			        		<li onclick="docEdit('${docList.id}')"><span><img src="${path}/images/table_t01.png"></span>编辑</li>
			        		<li onclick="messageAlert(4,'你确定要删除选择的用户吗？',function(){choose_open,deleteDoc(${docList.id})},1)"><span><img src="${path}/images/table_t02.png"></span>删除</li>
			        			<c:if test="${docList.status==1}"><li onclick="messageAlert(4,'你确定要冻结选择的用户吗？',function(){choose_open,freeze(${docList.id},${docList.status})},1)"><span><img src="${path}/images/table_t03.png"></span>冻结</li></c:if>
			        			<c:if test="${docList.status==0}"><li onclick="messageAlert(4,'你确定要解冻选择的用户吗？',function(){choose_open,freeze(${docList.id},${docList.status})},1)"><span><img src="${path}/images/table_t04.png"></span>解冻</li></c:if>
			        		</c:if>
			        	</ul>	
      				</td>
       			 </tr> 
  	 		</c:forEach>
  	 	</c:if> 
        </tbody>
    </table>
	
    <div id="doc_box">
    </div>
    
    </div>
    <script type="text/javascript">
	$(function(){
		docManagerInit();
		getDivPage("doc",'${docPageInfo}',showDocPageDataList);
	});
	</script>
</body>
</html>